:root {
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f7f7f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    margin: 30px auto;
    width: 350px;
  }

h1
{
    margin: 0;
    letter-spacing: 1px; /* 字距 */
}

h3
{
    border-bottom: 1px solid #bbb;
    margin-top: 20px;
    padding-bottom: 5px;
}

h4 
{
    margin-bottom: 5px;
    text-transform: uppercase; /* 强制转化为大写 */
}

.in-out-container
{
    background-color: #fff;
    box-shadow: var(--box-shadow);
    padding: 20px;
    display: flex;
    justify-content: space-between;
}

.in-out-container > div 
{
    flex: 1;
    text-align: center;
}

.in-out-container > div:first-of-type 
{
    border-right: 1px solid #dedede;
}
.in-out-container p
{
    font-size: 20px;
    letter-spacing: 1px;
    margin: 5px 0;
}

.income
{
    color: #2ecc71;
}

.pay
{
    color: #c0392b;
}

.list
{
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.list li 
{
    background-color: #fff;
    box-shadow: var(--box-shadow);
    color: #333;
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px;
    position: relative;
}

.delete-btn
{
    cursor: pointer;
    background-color: #e74c3c;
    color: #fff;
    border: 0;
    padding: 2px 5px;
    font-size: 20px;
    line-height: 20px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-100%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

label
{
    display: inline-block;
    margin: 10px 0;
}

input 
{
    width: 100%;
    padding: 10px;
    border: 1px solid #dedede;
    display: block;
}

.btn
{
    cursor: pointer;
    background-color: #9c88ff;
    box-shadow: var(--box-shadow);
    width: 100%;
    margin: 10px 0 30px;
    padding: 10px;
    border: 0;
    color: #fff;
    font-size: 16px;
}

.list li.plus
{
    border-right: 5px solid #2ecc71;
}

.list li.minus {
    border-right: 5px solid #c0392b;
  }

.list li:hover .delete-btn
{
    opacity: 1;
}